package com.sanhe.roller.activity.work;

import static com.menu.app.util.FunctionCode.START1;
import static com.menu.app.util.FunctionCode.START2;

import com.menu.app.activity.base.MenuBaseActivity;
import com.menu.app.it.M808;
import com.menu.app.util.port.SerialManage;
import com.sanhe.roller.util.Crc16Utils;

public abstract class BaseWorkActivity extends MenuBaseActivity implements M808 {

    @Override
    protected byte[][] getInterest() {
        return new byte[0][];
    }

    @Override
    protected void sendTouchEvent(byte data_H, byte data_L) {
        byte[] tmp = {(byte) 0x83, (byte) 0x10, 1, 1, data_H, data_L};
        tmp = Crc16Utils.getData(tmp);
        byte[] touch_event = new byte[11];
        touch_event[0] = START1;
        touch_event[1] = START2;
        touch_event[2] = 8;
        System.arraycopy(tmp, 0, touch_event, 3, tmp.length);
        SerialManage.getInstance().send(touch_event);
    }

    @Override
    protected void updateUI() {

    }

    @Override
    public void exit() {
        finish();
    }

    @Override
    public String getPageIndex() {
        return null;
    }
}

